package cfca.seal.factory;

import cfca.seal.sadk.DonePdfSeal;
import cfca.seal.sadk.PrePdfReader;
import cfca.seal.sadk.PrePdfSeal;
import cfca.seal.sadk.PrePdfSealExtra;
import java.io.IOException;

public class DonePdfSealFactory
{
  public static DonePdfSeal generateDonePdfSeal(PrePdfSeal prePdfSeal, byte[] pdfData, String reason, String location)
    throws IOException
  {
    DonePdfSeal donePdfSeal = new DonePdfSeal();
    PrePdfReader prePdfReader = new PrePdfReader(pdfData);
    PrePdfSealExtra prePdfSealExtra = new PrePdfSealExtra(reason, location);
    donePdfSeal.initPdfReader(prePdfReader);
    donePdfSeal.initPdfSealExtra(prePdfSealExtra);
    donePdfSeal.initPdfSeal(prePdfSeal);
    return donePdfSeal;
  }
}